package org.syncsoft.overalt.gui.impl.window.update;

import org.syncsoft.overalt.common.exception.SystemException;
import org.syncsoft.overalt.gui.api.WindowContextValue;
import org.syncsoft.overalt.gui.api.window.AbstractWindow;
import org.syncsoft.overalt.gui.api.window.AbstractWindowController;

public class UpdateWindowController extends AbstractWindowController<AbstractWindow> {
	String filePath;
	
	public UpdateWindowController(String filePath) {
		setFilePath(filePath);
	}
	
	@Override
	protected AbstractWindow doCreateWindow() throws SystemException {
		getCore().update(getFilePath());
		return null;
	}

	@Override
	protected void doSubmit(WindowContextValue context) throws SystemException {
		throw new UnsupportedOperationException();
	}

	protected String getFilePath() {
		return filePath;
	}

	protected void setFilePath(String filePath) {
		this.filePath = filePath;
	}

}
